<include file="Common/header" />
<div class="container">
    <div class="row">
        <div class="col-md-2">
            <include file="Common/left_siber" />
        </div>
        <div class="col-md-10">
            <div class="page-header"><h3>{$page_title}</h3></div>
            <div class="btn-group  role="group" aria-label="" style="margin-bottom:10px;" >
            <a  class="btn btn-default <if condition="CONTROLLER_NAME eq 'Category' && ACTION_NAME eq 'index'">active</if>" href="{:U('Category/index')}">分类</a>&nbsp;
            <a  class="btn btn-default <if condition="CONTROLLER_NAME eq 'Category' && ACTION_NAME eq 'add'">active</if>" href="{:U('Category/add')}" style="margin-bottom:10px;"> 添加分类</a>
        </div>
            <form action="{:U('Category/addhandler')}" method="post">
                <div class="form-group">
                    <input type="text" class="form-control"  placeholder=" 类名称" name="cname">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control"  placeholder="排序" name="sort">
                </div>
                <div class="form-group">
                    <select class="form-control" name="pid">
                        <option value="0">父级类 </option>
                        <foreach name="categorys" item="d">
                            <option value="{$d['id']}"><if condition="$d['pid'] neq 0"><?php  echo str_repeat('&nbsp',$d['level']*8); ?></if>|{$d['cname']}</option>
                        </foreach>

                    </select>
                </div>
                <div class="radio">
                    <label class="radio-inline">
                        <input type="radio" name="status" id="inlineRadio1" value="1" checked> 开启
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="status" id="inlineRadio2" value="0"> 关闭
                    </label>
                </div>
                <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span>添加</button>
            </form>
        </div>
    </div>
</div>
</div>
<include file="Common/footer" />